module Plugins
  def file_plugin
    http_image(@fileList[@filePos]) if @fileList[@filePos].match /^http:\/\//
  end

  def http_image(url)
    cache_dir=ENV['HOME']+File::SEPARATOR+".rview/Cache/"
    system "wget -x -P #{cache_dir} '#{url}'"
    @fileList[@filePos]=cache_dir+url.sub("http://","")
    picture
  end
end
